import request, { getBaseUrl } from "./request"

const baseUrl = getBaseUrl()
export const uploadUrl = baseUrl + "api/admin/Tools/upload"
export const UploadFileUrl = baseUrl + "api/admin/Tools/UploadFile"

export function upload(data) {
	return request({
		url: "/api/admin/Tools/upload",
		method: "post",
		data: data
	})
}

export function uploadFile(url) {
	return request({
		url: "/api/admin/Tools/UploadFile/" + url,
		method: "post"
	})
}

export function getFileUrl(url) {
	return baseUrl + url
}
